<!-- 显示模式转换 -->

<!-- 显示模式 -->

<!-- 块级模式 -->
<!-- 行内模式 -->
<!-- 行内块模式 -->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>显示模式</title>
    <style>
        /* 块级，独占一行，宽度默认是父级的100%,加宽高生效 */
        div {
            width: 100px;
            height: 100px;

            display: inline-block;
            /* display: inline; */
        }

        .div1 {
            background-color: brown;
        }

        .div2 {
            background-color: orange;
        }

        /* 行内：一行共存多个，尺寸由内容撑开 */
        span {
            width: 200px;
            height: 200px;
            
            display: inline-block;
            /* display: inline; */
        }

        .span1 {
            background-color: brown;
        }

        .span2 {
            background-color: orange;
        }

        /* 行内块，一行共存多个，默认尺寸由内容撑开，加宽高生效 */
        img {
            width: 100px;
            height: 100px;
            /* background-size: cover; */
        }

    </style>
</head>
<body>
    <!-- 块元素 -->
    <div class="div1">div标签</div>
    <div class="div2">div标签</div>

    <!-- 行内模式 -->
    <span class="span1">span1</span>
    <span class="span2">span2</span>

    <!-- 行内块模式 -->
     <img src="../../Pictures/Desk1.jpg" alt="">
     <img src="../../Pictures/Desk1.jpg" alt="">

</body>
</html>